package form;

import javax.swing.*;
import java.awt.*;

/**
 * Created by LLAP on 2017/12/28.
 * Copyright (c) 2017 LLAP. All rights reserved.
 */
public class Main extends Form {
    public Main() {
        super("", 400, 200);
        setLayout(new GridLayout(1, 3));
        JButton demand = new JButton("求租/求购");
        JButton offer = new JButton("出租/出售");
        JButton match = new JButton("<--匹配-->");
        this.add(demand);
        this.add(match);
        this.add(offer);
        demand.addActionListener(e -> {
            new form.Demand().setVisible(true);
        });
        match.addActionListener(e -> {
            new form.Match().setVisible(true);
        });
        offer.addActionListener(e -> {
            new form.Offer().setVisible(true);
        });
    }

    public static void main(String[] args) {
        new Main().setVisible(true);
    }
}
